<template>
  <div>
    <div>我是A组件</div>
    <button @click="emit">给B组件发送事件</button>
  </div>
</template>

<script setup lang=ts>
import {getCurrentInstance} from "vue"

const instance = getCurrentInstance()
const emit = ()=>{
  console.log("mitt");
  
  instance.proxy.$Bus.emit("on-xiaoman","A组件参数")
}

</script>

<style scoped>
</style>